{% extends 'base.html' %}
{% block title %}{{ courses|length }} Course{{ courses|length|pluralize }}{% endblock %}
{% block content %}
  	<table border="1">
  		<thead>
  			<th>Name</th>
	  		<th>Holes</th>
	  		<th>Par</th>
  		</thead>
  		{% for course in courses %}
  		<tr>
  			<td>
  				<a href="{{ course.get_absolute_url }}">{{ course.name }}</a>
  			</td>
	  		<td>{{ course.holes.count }}</td>
	  		<td>{{ course.sum_holes }}</td>
  		</tr>
  		{% endfor %}
  	</table>
  	<a href="/course/">Add...</a>
{% endblock %}